/**
 * Copyright 2007 Igor Chaves Cananéa
 *
 * This file is part of PBSFW
 *
 * PBSFW is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * PBSFW is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef _SIM_EVENT_H_
#define _SIM_EVENT_H_

#include <string>
#include "resetable.h"
using namespace std;

namespace pbsfw {
    class Process;
    class SimEvent : public Resetable {
        private:
            string name;

        public:
            SimEvent(string name);
            SimEvent(const SimEvent &s) : name(s.name) {}
            virtual ~SimEvent()  {}


            const char *getName() const {
                return this->name.c_str();
            }

            virtual void wait(Process &p) = 0;
            virtual void removeProcess(Process &p) = 0;
            virtual bool hasOccurred() const = 0;
            virtual void clear() = 0;

            bool operator==(const SimEvent &ev) const {
                return this == &ev;
            }
    };
};

#endif
